import request from '@/utils/request'

// 项目管理
export function getBizProjectList(param) {
    return request({
        url: 'rest/bizProject/getTreeByNameByLike',
        method: 'post',
        data: param
    })
}

export function getProjectNameList(param) {
    return request({
        url: 'rest/bizProject/getListByNameByLike',
        method: 'post',
        data: param
    })
}

// 项目保存
export function getBizProjectSave(param) {
    return request({
        url: 'rest/bizProject/saveEx',
        method: 'post',
        data: param
    })
}

// 删除项目
export function getBizProjectDelete(param) {
    return request({
        url: 'rest/bizProject/delete',
        method: 'post',
        data: param
    })
}

// 查询 项目下的工点列表
export function getSiteList(param) {
    return request({
        url: 'rest/site/getListBySectionId',
        method: 'post',
        data: param
    })
}

// 工点保存
export function getSiteSave(param) {
    return request({
        url: 'rest/site/saveEx',
        method: 'post',
        data: param
    })
}

// 删除工点
export function getSiteDelete(param) {
    return request({
        url: 'rest/site/deleteEx',
        method: 'post',
        data: param
    })
}

// 标段
// 保存标段
export function getSectionSave(param) {
    return request({
        url: 'rest/section/saveEx',
        method: 'post',
        data: param
    })
}

// 查询标段
export function getSectionList(param) {
    return request({
        url: 'rest/section/list',
        method: 'post',
        data: param
    })
}

// 删除标段
export function getSectionDelete(param) {
    return request({
        url: 'rest/section/delete',
        method: 'post',
        data: param
    })
}

// 获取单个工点数据
export function getSiteGet(param) {
    return request({
        url: 'rest/site/get',
        method: 'post',
        data: param
    })
}
